<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
         <script>

             let [x,y]=['hello','word'];
             console.log(x);
             console.log(y);
         </script>


        <script>
        
             let[a,[b,c]]=['我是a',['我是嵌套b','我是嵌套c']];
             console.log([b]);
             console.log([c]);

        </script>


        <script>

             var person={
                name:'张三',
                age:19,
                sex:'男'
             }
             var {name,age}=person;
             console.log(name,age);

        </script>


        <script>

            function myFun(){
                let time=document.write(Date());
                return time;
            }

            myFun();

        </script>


        <script>
                                
            var aa='我是aa';        
            var bb='我是bb';        
            [aa,bb]=[bb,aa];        
                    
            console.log('我是aa，交换后：'+aa);
            console.log('我是bb，交换后：'+bb);

        </script>

</body>
</html>